const { Tray, Menu, app } = require("electron");
function createTray(app, win) {
    const tray = new Tray("./start.png");
    const contextMenu = Menu.buildFromTemplate([
        { label: "Item1", type: "radio" },
        { label: "Item3", type: "radio", checked: true },
        {
            label: "Item4",
            type: "radio",
            click: () => {
                win.isVisible() ? win.hide() : win.show();
            },
        },
    ]);
    tray.setToolTip("我的应用.");
    tray.on("click", (e) => {
        if (e.shiftKey) {
            app.quit();
        }
    });
    tray.setContextMenu(contextMenu);
}
module.exports = createTray;
